<!doctype html>
<html>
<head>
	<meta charset="utf-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<meta name="viewport" content="width=divice-width,initial-scale=1.0"/>
	<title>图说东溪</title>
	<link rel="stylesheet" href="bootstrap/css/bootstrap.css"/>
	<link rel="stylesheet" href="css/style.css"/>
	<link rel="stylesheet" href="/openlayers/CSSFramedCloud.css"/>
	<!--<link rel="stylesheet" type="text/css" href="/esriapi/dijit/themes/tundra/tundra.css"/>-->
	<!--<link rel="stylesheet" type="text/css" href="/esriapi//esri/css/esri.css" />-->

</head>
<body class="claro">
	<!--地图加载容器-->
	<div id="allmap"></div>
	<!--导航条-->
	<nav class="navbar navbar-default navbar-fixed-top">
  		<div class="container-fluid">
			<div class="navbar-header">
				<text style="color: white;font-size: 25px;padding-top: 10px;margin-top:20px">图说东溪</text>
				<!--折叠按钮-->
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
			</div>
			<!--导航条菜单-->
			<div class="collapse navbar-collapse" id="navbar-collapse">
				<ul class="nav navbar-nav navbar-right" style="margin-right: 10px">
					<a><button class="btn"><img src="images/nav_Location.png"/><br/>首页</button></a>
					<a th:href="@{'/login'}"><button class="btn"><img src="images/nav_password.png"/><br/>登录</button></a>
				</ul>
    		</div>
		</div>
	</nav>
	<div class="modal fade" id="updateModel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title" id="myModalLabel">修改房屋信息</h4>
				</div>
				<div class="modal-body">
					<form>
						<div class="form-group">
							<label for="drid" class="control-label">门牌号:</label>
							<input id="drid" type="text" class="form-control"/>
							<input id="stid" type="hidden" />
						</div>
						<div class="form-group">
							<label for="drname" class="control-label">户主:</label>
							<input id="drname" type="text" class="form-control"/>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary" onclick="submitData()">保存修改</button>
				</div>
			</div>
		</div>
	</div>
	<!--js文件-->
	<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript" src="bootstrap/js/bootstrap.js"></script>
	<script type="text/javascript" src="js/style.js"></script>
	<script type="text/javascript" src="/openlayers/OpenLayers.js"></script>
	<script type="text/javascript" src="/js/base.js"></script>
	<!--<script type="text/javascript" src="/esriapi/config.js"></script>-->
	<!--<script type="text/javascript" src="/esriapi/init.js"></script>-->
	<!--<script type="text/javascript" src="/esriapi/main.js"></script>-->
<script>
    function updateInfo(id)
	{
	    $("#stid").val(id)
        $('#updateModel').modal()
	}
	function submitData() {
        var doorid=$("#drid").val();
        var doorname=$("#drname").val();
		$.post("/fw/update",{
		    "gid": $("#stid").val(),
			"doorid":doorid,
            "doorname":doorname
		},function (data) {
			alert("修改成功！")
            $("#doorid").text(doorid);
			$("#doorname").text(doorname)
            $('#updateModel').modal('hide')
        })
    }
</script>
</body>
</html>